home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / profiler.h < prev    next >
C/C++ Source or Header  |  2000-05-13  |  1KB  |  55 lines

  1. #ifndef PROFILER_H
  2. #define PROFILER_H
  3.  
  4. /* profiling */
  5. enum {
  6.     PROFILER_END = -1,
  7.     PROFILER_CPU1 = 0,
  8.     PROFILER_CPU2,
  9.     PROFILER_CPU3,
  10.     PROFILER_CPU4,
  11.     PROFILER_CPU5,
  12.     PROFILER_CPU6,
  13.     PROFILER_CPU7,
  14.     PROFILER_CPU8,
  15.     PROFILER_VIDEO,
  16.     PROFILER_BLIT,
  17.     PROFILER_SOUND,
  18.     PROFILER_MIXER,
  19.     PROFILER_TIMER_CALLBACK,
  20.     PROFILER_HISCORE,    /* high score load can slow things down if incorrectly written */
  21.     PROFILER_INPUT,        /* input.c and inptport.c */
  22.     PROFILER_EXTRA,        /* everything else */
  23.  
  24.     /* the USER types are available to driver writers to profile */
  25.     /* custom sections of the code */
  26.     PROFILER_USER1,
  27.     PROFILER_USER2,
  28.     PROFILER_USER3,
  29.     PROFILER_USER4,
  30.  
  31.     PROFILER_PROFILER,
  32.     PROFILER_IDLE,
  33.     PROFILER_TOTAL
  34. };
  35.  
  36.  
  37. /*
  38. To start profiling a certain section, e.g. video:
  39. profiler_mark(PROFILER_VIDEO);
  40.  
  41. to end profiling the current section:
  42. profiler_mark(PROFILER_END);
  43.  
  44. the profiler handles a FILO list so calls may be nested.
  45. */
  46.  
  47. void profiler_mark(int type);
  48.  
  49. /* functions called by usrintf.c */
  50. void profiler_start(void);
  51. void profiler_stop(void);
  52. void profiler_show(struct osd_bitmap *bitmap);
  53.  
  54. #endif    /* PROFILER_H */
  55.